#include <windows.h>
#include <stdio.h>

int main(void)
{
    NONCLIENTMETRICSW ncm;
    char FaceName[256];
    DWORD StrLen;
    ncm.cbSize = sizeof (NONCLIENTMETRICSW);
    //sizeof (NONCLIENTMETRICSW) = 504 or 500? ;
    printf("size: %d\n", ncm.cbSize);

    if (SystemParametersInfoW (SPI_GETNONCLIENTMETRICS, sizeof (NONCLIENTMETRICSW) , &ncm, 0))
    {
        StrLen = WideCharToMultiByte(CP_ACP, 0, ncm.lfCaptionFont.lfFaceName, -1, NULL, 0, NULL, FALSE); 
        StrLen = WideCharToMultiByte(CP_ACP, 0, ncm.lfCaptionFont.lfFaceName, -1, FaceName, StrLen, NULL, FALSE); 
        printf("lfCaptionFont: %s \n", FaceName);

        StrLen = WideCharToMultiByte(CP_ACP, 0, ncm.lfMenuFont.lfFaceName, -1, NULL, 0, NULL, FALSE); 
        StrLen = WideCharToMultiByte(CP_ACP, 0, ncm.lfMenuFont.lfFaceName, -1, FaceName, StrLen, NULL, FALSE); 
        printf("lfMenuFont: %s \n", FaceName);

        StrLen = WideCharToMultiByte(CP_ACP, 0, ncm.lfStatusFont.lfFaceName, -1, NULL, 0, NULL, FALSE); 
        StrLen = WideCharToMultiByte(CP_ACP, 0, ncm.lfStatusFont.lfFaceName, -1, FaceName, StrLen, NULL, FALSE); 
        printf("lfStatusFont: %s \n", FaceName);

        StrLen = WideCharToMultiByte(CP_ACP, 0, ncm.lfMessageFont.lfFaceName, -1, NULL, 0, NULL, FALSE); 
        StrLen = WideCharToMultiByte(CP_ACP, 0, ncm.lfMessageFont.lfFaceName, -1, FaceName, StrLen, NULL, FALSE); 
        printf("lfMessageFont: %s \n", FaceName);

    }

    printf("size: %d\n", ncm.cbSize);
    return 0;
}
